package edu.sctu.lab03;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * Created by w On 2018/5/28.
 */
public class UserListServlet extends HttpServlet{
    @Override
    protected void doGet(HttpServletRequest req,
                         HttpServletResponse resp)
            throws ServletException, IOException {
        resp.setHeader("content-type","test/html;charset=UTF-8");
        PrintWriter out=resp.getWriter();
        out.write("<table>");
        out.write("<tr>");
        out.write("<td>编号</td>");
        out.write("<td>用户名</td>");
        out.write("<td>密码</td>");
        out.write("<td>操作1</td>");
        out.write("<td>操作2/td>");
        out.write("</tr>");
        out.write("<tr>");
        out.write("<td>1001</td>");
        out.write("<td>chen</td>");
        out.write("<td>123</td>");
        out.write("<td>删除</td>");
        out.write("<td>更新</td>");
        out.write("</tr>");
        out.write("</table>");
    }
}
